package com.a01_2021.thousandstimes.instance.service;

import com.a01_2021.thousandstimes.exception.CustomException;
import com.a01_2021.thousandstimes.instance.entity.Communication;
import com.baomidou.mybatisplus.extension.service.IService;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author E1xP
 * @since 2021-03-30
 */
public interface ICommunicationService extends IService<Communication> {

    Communication send(long userId, long targetUserId, String content) throws CustomException;

    List<Communication> receive(long userId, LocalDateTime time);

    int getCommunicationCount(long userId, LocalDate date);
}
